import React from 'react';
import {Button, Card, Message} from 'antd';


export default class AntMessage extends React.Component {

  openMessage(type) {
    Message[type](type+'通知内容通知内容', 5);
  }

  render() {
    return (
      <div className="">
        <Card title="spin用法">
          <Button type="primary" onClick={() => this.openMessage('success')}>success</Button>
          <Button type="primary" onClick={() => this.openMessage('error')}>error</Button>
          <Button type="primary" onClick={() => this.openMessage('info')}>info</Button>
          <Button type="primary" onClick={() => this.openMessage('warning')}>warning</Button>
          <Button type="primary" onClick={() => this.openMessage('loading')}>loading</Button>
        </Card>
      </div>
    );
  }
}